LOCAL_PATH := $(call my-dir)
    include $(CLEAR_VARS)
    LOCAL_MODULE    := OgreGLESSample
   
	
    LOCAL_LDLIBS	:= -Wl,--start-group -landroid -lc -lm -lgcc -ldl -llog -lEGL -lGLESv1_CM
    LOCAL_LDLIBS	+= -L../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/lib/armeabi-v7a -L../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Dependencies/lib/armeabi-v7a
    LOCAL_LDLIBS	+= -lPlugin_ParticleFXStatic -lPlugin_OctreeSceneManagerStatic -lRenderSystem_GLESStatic -lOgreOverlayStatic -lOgreMainStatic
    LOCAL_LDLIBS	+= -lzzip -lz -lFreeImage -lfreetype -lOIS  ../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Dependencies/lib/armeabi-v7a/libsupc++.a ../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Dependencies/lib/armeabi-v7a/libstdc++.a ./obj/local/armeabi-v7a/libcpufeatures.a
	LOCAL_LDLIBS	+= ../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/lib/armeabi-v7a/libOgreOverlayStatic.a
    LOCAL_LDLIBS	+= ../.OgreMove/obj/local/armeabi-v7a/libOgreMove.a
    LOCAL_LDLIBS	+= ../libraries/common-android-native-libs-master/lua/obj/local/armeabi-v7a/liblua.a
    LOCAL_LDLIBS	+= ../libraries/common-android-native-libs-master/luabind/obj/local/armeabi-v7a/libluabind.a
    LOCAL_LDLIBS	+= ../libraries/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/libgnustl_static.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPhysX3CommonCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPvdRuntimeCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libSimulationControllerCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libSceneQueryCHECKED.a
	LOCAL_LDLIBS    += ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libLowLevelCHECKED.a
    LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libLowLevelClothCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPhysX3CHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPhysX3VehicleCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPhysX3CookingCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPhysX3ExtensionsCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPhysX3CharacterKinematicCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPhysXProfileSDKCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPxTaskCHECKED.a
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/Lib/android9/libPhysXVisualDebuggerSDKCHECKED.a  
	LOCAL_LDLIBS	+= ../libraries/PhysX-3.3.0_ANDROID_SDK_Core/externals/nvToolsExt/1/lib/armv7/libnvToolsExt.a -Wl,--end-group 
	
	
	
	
	
    
    LOCAL_STATIC_LIBRARIES := android_native_app_glue cpufeatures
    
    LOCAL_CFLAGS := -DGL_GLEXT_PROTOTYPES=1 -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/include/Build -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/include/OgreMain -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/include/RenderSystems/GLES
    LOCAL_CFLAGS += -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/include/RenderSystems/GLES/EGL -I$(ANDROID_NDK)/sources/cpufeatures -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/include/Components 
    LOCAL_CFLAGS += -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/include/PlugIns/ParticleFX -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Ogre/include/PlugIns/OctreeSceneManager 
    LOCAL_CFLAGS += -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Dependencies/include -I../libraries/OgreSDK_Android_v1-9-0RC1/Ogre_Android_SDK/Dependencies/include/OIS 
    LOCAL_CFLAGS += -Ijni/include
    LOCAL_CFLAGS += -I../UltimateSubsystemRegistry/include 
    LOCAL_CFLAGS += -I../UltimateAsioNetworkPlugin/include 
    LOCAL_CFLAGS += -I../UltimatePhysX3Plugin/include      
    LOCAL_CFLAGS += -I../.OgreMove
    LOCAL_CFLAGS += -I../.OgreMove/include
    LOCAL_CFLAGS += -I../libraries/common-android-native-libs-master/luabind/jni
    LOCAL_CFLAGS += -I../libraries/common-android-native-libs-master/lua/jni/include
    LOCAL_CFLAGS += -I../libraries/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/include
    LOCAL_CFLAGS += -I../libraries/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include
    LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/characterkinematic/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/foundation/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/cooking/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/cloth/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/common/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/extensions/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/geometry/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/particles/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/physxprofilesdk/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/physxvisualdebuggersdk/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/pvd/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/pxtask/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/RepX/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/RepXUpgrader/
	LOCAL_CFLAGS += -I../libraries/PhysX-3.3.0_ANDROID_SDK_Core/include/vehicle/
    LOCAL_CFLAGS += -fexceptions -frtti -x c++ -D___ANDROID___ -DANDROID -DZZIP_OMIT_CONFIG_H 
    
    LOCAL_PATH := ./jni
    LOCAL_SRC_FILES := Main.cpp 
    LOCAL_SRC_FILES += src/AndroidScriptFileReader.cpp
    LOCAL_SRC_FILES += src/UltimateAndroidInputSubsystem.cpp
    LOCAL_SRC_FILES += src/UltimateAndroidGameOverHandler.cpp
    LOCAL_SRC_FILES += src/boost/error_code.cpp
    LOCAL_SRC_FILES += src/boost/future.cpp
    LOCAL_SRC_FILES += src/boost/tss_null.cpp
    LOCAL_SRC_FILES += src/boost/pthread/once_atomic.cpp
    LOCAL_SRC_FILES += src/boost/pthread/thread.cpp

    include $(BUILD_SHARED_LIBRARY) 
      
    $(call import-module,android/cpufeatures) 
    $(call import-module,android/native_app_glue) 
